//
//  Common.h
//  LotteryProject
//
//  Created by 阳光 on 17/7/9.
//  Copyright © 2017年 阳光. All rights reserved.
//

#ifndef Common_h
#define Common_h


#define kGapTime        .5
#define kmargin         10


#define  IOS7   ([[[UIDevice currentDevice]systemVersion] floatValue]>=7.0)

#define  iOS10  ([[UIDevice currentDevice].systemVersion doubleValue]>=10.0)


// 屏幕
#define APPW [UIScreen mainScreen].bounds.size.width
#define APPH [UIScreen mainScreen].bounds.size.height


//应用类型
#define WEAKSELF __weak  typeof(self) weakSelf=self


// 字体大小
#define FontNumber(a)     [UIFont fontWithName:@"Arial" size:a]

// 颜色值 16进制
#define HexRGB(rgbValue)    [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define RGB(R,G,B,Alpha)    [UIColor colorWithRed:R/255.f green:G/255.f blue:B/255.f alpha:Alpha]

// View 圆角和加边框
#define ViewBorderRadius(View, Radius, Width, Color)\
\
[View.layer setCornerRadius:(Radius)];\
[View.layer setMasksToBounds:YES];\
[View.layer setBorderWidth:(Width)];\
[View.layer setBorderColor:[Color CGColor]]



#endif /* Common_h */
